va_list args;
va_start(args, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n");
+ vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout);
IOStream_vprint(ctxt->info, msg, args);
IOStream_print(ctxt->info, "\n");
va_end(args);
#include <stdlib.h>
#include <stdio.h>
-#ifndef _XEN_XFR_STUB_
+#ifdef _XEN_XFR_STUB_
+typedef unsigned long u32;
+#else
#include "xc.h"
#include "xc_io.h"
#endif
#define DEBUG 1
#include "debug.h"
-#ifndef _XEN_XFR_STUB_
-static int domain_suspend(u32 dom, void *data){
+
+int domain_suspend(u32 dom, void *data){
int err = 0;
Conn *xend = data;
return err;
}
+#ifndef _XEN_XFR_STUB_
static int xc_handle = 0;
int xcinit(void){
err = marshal_string(io, vmconfig, vmconfig_n);
if(err) goto exit;
n = 32 * 1024 * 1024;
+ n = 32 * 1024;
buf_n = sizeof(buf);
err = marshal_uint32(io, n);
for(k = 0; k < n; k += d){
}
dom = 99;
- err = xfr_vm_suspend(xend, dom);
+ err = domain_suspend(dom, xend);
+ IOStream_close(io);
exit:
#else
XcIOContext _ioctxt = {}, *ioctxt = &_ioctxt;
// POST the form.
curl_easy_setopt(curl, CURLOPT_HTTPPOST, form);
dprintf("> curl perform...\n");
-#ifdef _XEN_XFR_STUB_
+#if 0 && defined(_XEN_XFR_STUB_)
dprintf("> _XEN_XFR_STUB_ defined - not calling xend\n");
curlcode = 0;
#else